package com.zhg.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/user")
public class UserController {

	 @RequestMapping( value = {"/index"},
	            method = {RequestMethod.POST}, produces = {"application/json"})
	 public String index(Model model,@RequestParam("name") String name) {
		 
		 model.addAttribute("name", name);
		 return "index";
	 }
	 @RequestMapping( value = {"/login"})
	 public String login() {
		 return "login";
	 }
	
}
